package sctu.edu.java.year2016.team05.zengkun.day20160524.chapter7_2;

import java.util.Scanner;

/**
 *尝试编写一个矩形类，将长与宽初始化，定义一个成员方法求此面积。
 *  Created by mike on 2016/5/25.
 */
public class Example_2 {
    public static void main(String[] args) {
        System.out.println("请输入矩形的长边：");
        Scanner in = new Scanner(System.in);
        double Longside=in.nextDouble();
        System.out.println("请输入矩形的短边：");
        double Shortside =in.nextDouble();
        Example_1 aa= new Example_1(Longside,Shortside);
        System.out.println(aa.getarea(Longside, Shortside));
    }

}
